import Vue from 'vue'
// 1.导入vue-router包
import VueRouter from 'vue-router'
// 2.手动安装 vuerouter
Vue.use(VueRouter)

import app from './app.vue'

// 导入 account 组件
import account from './main/account.vue'

// 导入 goodslist 组件
import goodslist from './main/goodslist.vue'

// 3.创建路由对象
var router = new VueRouter({
    routes: [
        // account goodslist
        { path: '/account', component: account },
        { path: '/goodslist', component: goodslist },
    ]
})

var vm = new Vue({
    el: "#app",
    render: c => c(app), //render会吧原有的数据 给覆盖
    router //挂在路由对象
})